from selenium import webdriver
# import requests
driver = webdriver.Edge()
driver.get('https://www.baidu.com')

cookies = driver.get_cookies()
cook = []

for cookie in cookies:
    cook.append(cookie['name']+':'+cookie['value'])

cookies = '; '.join(cook)
print(cookies)
# head = {
#     'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
# }
# requests.get(url='https://www.baidu.com')


